fix reversion
authorJoey Hess <joeyh@joeyh.name>
Wed, 22 Jan 2025 20:28:29 +0000 (16:28 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 22 Jan 2025 20:28:54 +0000 (16:28 -0400)
af3b9cbd3647ecfb3f3f6c4008dc9e64f7d42591 lost takeFileName, breaking the
test suite

Annex/ReplaceFile.hs

index 188b300b886b8d3f39eb43013db5b367c4b7da8b..5cb46b17dd7d0dbeed45308901e6fd2759c03918 100644 (file)
@@ -57,7 +57,7 @@ replaceFile createdirectory file action = replaceFile' createdirectory file (con
 
 replaceFile' :: (RawFilePath -> Annex ()) -> RawFilePath -> (a -> Bool) -> (RawFilePath -> Annex a) -> Annex a
 replaceFile' createdirectory file checkres action = withOtherTmp $ \othertmpdir -> do
-       let basetmp = relatedTemplate' file
+       let basetmp = relatedTemplate' (P.takeFileName file)
        withTmpDirIn (fromRawFilePath othertmpdir) (toOsPath basetmp) $ \tmpdir -> do
                let tmpfile = toRawFilePath tmpdir P.</> basetmp
                r <- action tmpfile